#include <54func.h>
void handle(int signum)
{
    printf("Before,signum = %d\n",signum);
    sleep(2);
    printf("After,signum = %d\n",signum);

}
int main()
{
    struct sigaction act;
    memset(&act,0,sizeof(act));//用不知名的结构体的时候，先进行初始化
    act.sa_handler = handle;

    sigaction(SIGINT,&act,NULL);
    sigaction(SIGQUIT,&act,NULL);
    char buf[4096] = {0};
    read(STDIN_FILENO,buf,sizeof(buf));
    printf("buf = %s\n",buf);
    return 0;
}
